package homeWork;

public class Date {
    // 日期类,属性私有
    //年
    private int year;
    //月
    private int month;
    //日
    private int day;

    // 人员类
    // 姓名
    private int name;
    //生日

    // 身份证号
    private String number;

    public boolean Year() {
        return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
    }
    public static void main(String[] args) {
        Date date = new Date();
    }

    public int left_side;
    public int right_side;
    public int bottom_side;
    public boolean equilateral_triangle(){
        return this.left_side == this.right_side && this.left_side == this.bottom_side;
    }
    public boolean isosceles_triangle(){
        return this.left_side == this.right_side || this.left_side == this.bottom_side || this.right_side == this.bottom_side;
    }
    public boolean right_triangle(){
        return this.left_side * this.left_side + this.right_side * this.right_side == this.bottom_side * this.bottom_side || this.bottom_side * this.bottom_side + this.right_side * this.right_side == this.left_side*this.left_side || this.left_side * this.left_side + this.bottom_side * this.bottom_side == this.right_side * this.right_side;
    }
    public int perimeter(){
        return this.left_side + this.right_side + this.bottom_side;
    }

    public static void main(String[] args) {
        Triangle tr = new Triangle();
        tr.left_side =3;
        tr.right_side = 4;
        tr.bottom_side = 5;
        System.out.println(tr.equilateral_triangle());
        System.out.println(tr.isosceles_triangle());
        System.out.println(tr.perimeter());
}
